import { defineStore } from 'pinia'

export const useToken = defineStore('token', {
  state: () => ({
    someState: '',
  }),
  actions: {
    // 设置 Token
    setToken(newToken: string) {
      this.someState = newToken
    },
    
    // 清除 Token
    clearToken() {
      this.someState = ''
    }
  },
  persist: {
    storage: localStorage,
  },
})


  